<!-- HTML header for doxygen 1.8.10-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.9.8"/>
<title>NATS C Client with JetStream and Streaming support: micro_service_config_s Struct Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="customdoxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;" >
   <div id="projectname">NATS C Client with JetStream and Streaming support
   &#160;<span id="projectnumber">3.10.0-beta</span>
   </div>
   <div id="projectbrief">The nats.io C Client, Supported by Synadia Communications Inc.</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.8 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search/",'.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */
</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(document).ready(function(){initNavTree('structmicro__service__config__s.html',''); initResizable(); });
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<div id="MSearchResults">
<div class="SRPage">
<div id="SRIndex">
<div id="SRResults"></div>
<div class="SRStatus" id="Loading">Loading...</div>
<div class="SRStatus" id="Searching">Searching...</div>
<div class="SRStatus" id="NoMatches">No Matches</div>
</div>
</div>
</div>
</div>

<div class="header">
  <div class="summary">
<a href="#pub-attribs">Public Attributes</a> &#124;
<a href="structmicro__service__config__s-members.html">List of all members</a>  </div>
  <div class="headertitle"><div class="title">micro_service_config_s Struct Reference<div class="ingroups"><a class="el" href="group__micro_group.html">- Microservices</a> &raquo; <a class="el" href="group__micro_structs.html">Public structs</a></div></div></div>
</div><!--header-->
<div class="contents">

<p>The Microservice top-level configuration object.  
 <a href="structmicro__service__config__s.html#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="nats_8h_source.html">nats.h</a>&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-attribs" name="pub-attribs"></a>
Public Attributes</h2></td></tr>
<tr class="memitem:acb82e165927f5e5c404beb4f3120a8e2" id="r_acb82e165927f5e5c404beb4f3120a8e2"><td class="memItemLeft" align="right" valign="top">const char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structmicro__service__config__s.html#acb82e165927f5e5c404beb4f3120a8e2">Name</a></td></tr>
<tr class="memdesc:acb82e165927f5e5c404beb4f3120a8e2"><td class="mdescLeft">&#160;</td><td class="mdescRight">The name of the service.  <br /></td></tr>
<tr class="separator:acb82e165927f5e5c404beb4f3120a8e2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a20d3780b9452237119aee56853216b03" id="r_a20d3780b9452237119aee56853216b03"><td class="memItemLeft" align="right" valign="top">const char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structmicro__service__config__s.html#a20d3780b9452237119aee56853216b03">Version</a></td></tr>
<tr class="memdesc:a20d3780b9452237119aee56853216b03"><td class="mdescLeft">&#160;</td><td class="mdescRight">The (semantic) version of the service.  <br /></td></tr>
<tr class="separator:a20d3780b9452237119aee56853216b03"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a090e884af689503d9c2fcb086a5478e6" id="r_a090e884af689503d9c2fcb086a5478e6"><td class="memItemLeft" align="right" valign="top">const char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structmicro__service__config__s.html#a090e884af689503d9c2fcb086a5478e6">Description</a></td></tr>
<tr class="memdesc:a090e884af689503d9c2fcb086a5478e6"><td class="mdescLeft">&#160;</td><td class="mdescRight">The description of the service.  <br /></td></tr>
<tr class="separator:a090e884af689503d9c2fcb086a5478e6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:abdd93c544c7c368ae4793c4c479afc61" id="r_abdd93c544c7c368ae4793c4c479afc61"><td class="memItemLeft" align="right" valign="top">const char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structmicro__service__config__s.html#abdd93c544c7c368ae4793c4c479afc61">QueueGroup</a></td></tr>
<tr class="memdesc:abdd93c544c7c368ae4793c4c479afc61"><td class="mdescLeft">&#160;</td><td class="mdescRight">Overrides the default queue group for the service ("q").  <br /></td></tr>
<tr class="separator:abdd93c544c7c368ae4793c4c479afc61"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a78fed3096635174eb037622003661e49" id="r_a78fed3096635174eb037622003661e49"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structmicro__service__config__s.html#a78fed3096635174eb037622003661e49">NoQueueGroup</a></td></tr>
<tr class="memdesc:a78fed3096635174eb037622003661e49"><td class="mdescLeft">&#160;</td><td class="mdescRight">Disables the use of a queue group for the service.  <br /></td></tr>
<tr class="separator:a78fed3096635174eb037622003661e49"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4a5a97a4181a4870353f9e139cca72fc" id="r_a4a5a97a4181a4870353f9e139cca72fc"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structnats_metadata.html">natsMetadata</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structmicro__service__config__s.html#a4a5a97a4181a4870353f9e139cca72fc">Metadata</a></td></tr>
<tr class="memdesc:a4a5a97a4181a4870353f9e139cca72fc"><td class="mdescLeft">&#160;</td><td class="mdescRight">Immutable metadata for the service, a JSON-encoded user-provided object, e.g. <code>{"key":"value"}</code>  <br /></td></tr>
<tr class="separator:a4a5a97a4181a4870353f9e139cca72fc"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae13d06757417aabf01619090ab83f977" id="r_ae13d06757417aabf01619090ab83f977"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__micro_types.html#ga7718d2f2c911e4cf677788f4ffe048cd">microEndpointConfig</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structmicro__service__config__s.html#ae13d06757417aabf01619090ab83f977">Endpoint</a></td></tr>
<tr class="memdesc:ae13d06757417aabf01619090ab83f977"><td class="mdescLeft">&#160;</td><td class="mdescRight">The "main" (aka default) endpoint configuration.  <br /></td></tr>
<tr class="separator:ae13d06757417aabf01619090ab83f977"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8385ccdaef440f9406a876868663ec56" id="r_a8385ccdaef440f9406a876868663ec56"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__micro_callbacks.html#gab465a9b31672c63738e8f6b0a61c2e90">microRequestHandler</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structmicro__service__config__s.html#a8385ccdaef440f9406a876868663ec56">StatsHandler</a></td></tr>
<tr class="memdesc:a8385ccdaef440f9406a876868663ec56"><td class="mdescLeft">&#160;</td><td class="mdescRight">A custom stats handler.  <br /></td></tr>
<tr class="separator:a8385ccdaef440f9406a876868663ec56"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4069a6987c910fb4f045b233b6befc27" id="r_a4069a6987c910fb4f045b233b6befc27"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__micro_callbacks.html#ga7a40fbbb9b1102f0a7679f9dfcf6c0d6">microErrorHandler</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structmicro__service__config__s.html#a4069a6987c910fb4f045b233b6befc27">ErrHandler</a></td></tr>
<tr class="memdesc:a4069a6987c910fb4f045b233b6befc27"><td class="mdescLeft">&#160;</td><td class="mdescRight">An error notification handler.  <br /></td></tr>
<tr class="separator:a4069a6987c910fb4f045b233b6befc27"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab349d30e0f637d449c0af865234a0985" id="r_ab349d30e0f637d449c0af865234a0985"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__micro_callbacks.html#gae0341a98388ffd1094472d2ced36d840">microDoneHandler</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structmicro__service__config__s.html#ab349d30e0f637d449c0af865234a0985">DoneHandler</a></td></tr>
<tr class="memdesc:ab349d30e0f637d449c0af865234a0985"><td class="mdescLeft">&#160;</td><td class="mdescRight">A callback handler for handling the final cleanup <code>Done</code> event, right before the service is destroyed.  <br /></td></tr>
<tr class="separator:ab349d30e0f637d449c0af865234a0985"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0a0ae007824f6f53fbb0cb4b940c5ad2" id="r_a0a0ae007824f6f53fbb0cb4b940c5ad2"><td class="memItemLeft" align="right" valign="top">void *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structmicro__service__config__s.html#a0a0ae007824f6f53fbb0cb4b940c5ad2">State</a></td></tr>
<tr class="memdesc:a0a0ae007824f6f53fbb0cb4b940c5ad2"><td class="mdescLeft">&#160;</td><td class="mdescRight">A user-provided pointer to state data.  <br /></td></tr>
<tr class="separator:a0a0ae007824f6f53fbb0cb4b940c5ad2"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>The service is created with a clone of the config and all of its values, so the original can be freed or modified after calling micro_AddService. </p>
</div><h2 class="groupheader">Member Data Documentation</h2>
<a id="acb82e165927f5e5c404beb4f3120a8e2" name="acb82e165927f5e5c404beb4f3120a8e2"></a>
<h2 class="memtitle"><span class="permalink"><a href="#acb82e165927f5e5c404beb4f3120a8e2">&#9670;&#160;</a></span>Name</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const char* micro_service_config_s::Name</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>It can be used to compose monitoring messages specific to this service. </p>

</div>
</div>
<a id="a20d3780b9452237119aee56853216b03" name="a20d3780b9452237119aee56853216b03"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a20d3780b9452237119aee56853216b03">&#9670;&#160;</a></span>Version</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const char* micro_service_config_s::Version</td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a id="a090e884af689503d9c2fcb086a5478e6" name="a090e884af689503d9c2fcb086a5478e6"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a090e884af689503d9c2fcb086a5478e6">&#9670;&#160;</a></span>Description</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const char* micro_service_config_s::Description</td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a id="abdd93c544c7c368ae4793c4c479afc61" name="abdd93c544c7c368ae4793c4c479afc61"></a>
<h2 class="memtitle"><span class="permalink"><a href="#abdd93c544c7c368ae4793c4c479afc61">&#9670;&#160;</a></span>QueueGroup</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const char* micro_service_config_s::QueueGroup</td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a id="a78fed3096635174eb037622003661e49" name="a78fed3096635174eb037622003661e49"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a78fed3096635174eb037622003661e49">&#9670;&#160;</a></span>NoQueueGroup</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool micro_service_config_s::NoQueueGroup</td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a id="a4a5a97a4181a4870353f9e139cca72fc" name="a4a5a97a4181a4870353f9e139cca72fc"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a4a5a97a4181a4870353f9e139cca72fc">&#9670;&#160;</a></span>Metadata</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="structnats_metadata.html">natsMetadata</a> micro_service_config_s::Metadata</td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a id="ae13d06757417aabf01619090ab83f977" name="ae13d06757417aabf01619090ab83f977"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae13d06757417aabf01619090ab83f977">&#9670;&#160;</a></span>Endpoint</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__micro_types.html#ga7718d2f2c911e4cf677788f4ffe048cd">microEndpointConfig</a>* micro_service_config_s::Endpoint</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>It is the default in that it does not require calling microService_AddEndpoint, it is added automatically when creating the service. </p>

</div>
</div>
<a id="a8385ccdaef440f9406a876868663ec56" name="a8385ccdaef440f9406a876868663ec56"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a8385ccdaef440f9406a876868663ec56">&#9670;&#160;</a></span>StatsHandler</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__micro_callbacks.html#gab465a9b31672c63738e8f6b0a61c2e90">microRequestHandler</a> micro_service_config_s::StatsHandler</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>It will be called to output the service's stats. It replaces the default stats handler but can pull the service stats using microService_GetStats function, then marshal them itself, as appropriate. </p>

</div>
</div>
<a id="a4069a6987c910fb4f045b233b6befc27" name="a4069a6987c910fb4f045b233b6befc27"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a4069a6987c910fb4f045b233b6befc27">&#9670;&#160;</a></span>ErrHandler</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__micro_callbacks.html#ga7a40fbbb9b1102f0a7679f9dfcf6c0d6">microErrorHandler</a> micro_service_config_s::ErrHandler</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>It will be called asynchonously upon internal errors. It does not get called for application-level errors, successfully sent out by the microservice. </p>

</div>
</div>
<a id="ab349d30e0f637d449c0af865234a0985" name="ab349d30e0f637d449c0af865234a0985"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab349d30e0f637d449c0af865234a0985">&#9670;&#160;</a></span>DoneHandler</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__micro_callbacks.html#gae0341a98388ffd1094472d2ced36d840">microDoneHandler</a> micro_service_config_s::DoneHandler</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>It will be called directly from <a class="el" href="group__micro_service_functions.html#ga35de7172dac67472ac3890bc955b9b42" title="Stops a running microservice.">microService_Stop</a> method, so it may be executed in any of the user threads or in the async callback thread if the service stops itself on connection closed or an error event. </p>

</div>
</div>
<a id="a0a0ae007824f6f53fbb0cb4b940c5ad2" name="a0a0ae007824f6f53fbb0cb4b940c5ad2"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a0a0ae007824f6f53fbb0cb4b940c5ad2">&#9670;&#160;</a></span>State</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void* micro_service_config_s::State</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>A closure that is accessible from the request, stats, and internal event handlers. Please note that handlers are invoked on separate threads, consider thread-safe mechanisms of accessing the data. </p>

</div>
</div>
<hr/>The documentation for this struct was generated from the following file:<ul>
<li><a class="el" href="nats_8h_source.html">nats.h</a></li>
</ul>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- HTML footer for doxygen 1.8.10-->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="structmicro__service__config__s.html">micro_service_config_s</a></li>
    <li class="footer">NATS.IO Supported By Synadia Communications Inc.
    <a href="http://www.nats.io">
    </a></li>
  </ul>
</div>
</body>
</html>
